<template>
	<view class="classify-layout">
		<custom-navbar title="分类"></custom-navbar>
		<view class="classify">
			<theme-item v-for="item in classifies" :key="_id" :item="item"></theme-item>
			<theme-item :more="true"></theme-item>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	import {
		aipGetClassify
	} from '@/api/api.js'
	import {
		onLoad
	} from '@dcloudio/uni-app'

	const classifies = ref([])

	onLoad(() => {
		doHttpGetClassify()
	})

	const doHttpGetClassify = async () => {
		let res = await aipGetClassify({})
		if (res.errCode == 0) {
			classifies.value = res.data
		}
	}
</script>

<style lang="scss" scoped>
	.classify {
		padding: 30rpx;
		display: grid;
		gap: 15rpx;
		grid-template-columns: repeat(3, 1fr);

	}
</style>